<!DOCTYPE html>
<!--

	Modified template for STM32CubeMX.AI purpose

	d0.1: 	jean-michel.delorme@st.com
			add ST logo and ST footer

	d2.0: 	jean-michel.delorme@st.com
			add sidenav support

	d2.1: 	jean-michel.delorme@st.com
			clean-up + optional ai_logo/ai meta data
			
==============================================================================
           "GitHub HTML5 Pandoc Template" v2.1 — by Tristano Ajmone           
==============================================================================
Copyright © Tristano Ajmone, 2017, MIT License (MIT). Project's home:

- https://github.com/tajmone/pandoc-goodies

The CSS in this template reuses source code taken from the following projects:

- GitHub Markdown CSS: Copyright © Sindre Sorhus, MIT License (MIT):
  https://github.com/sindresorhus/github-markdown-css

- Primer CSS: Copyright © 2016-2017 GitHub Inc., MIT License (MIT):
  http://primercss.io/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The MIT License 

Copyright (c) Tristano Ajmone, 2017 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.

"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017, released
under the MIT License (MIT); it contains readaptations of substantial portions
of the following third party softwares:

(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
==============================================================================-->
<html>
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>Toolboxes and layers</title>
  <style type="text/css">
.markdown-body{
	-ms-text-size-adjust:100%;
	-webkit-text-size-adjust:100%;
	color:#24292e;
	font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
	font-size:16px;
	line-height:1.5;
	word-wrap:break-word;
	box-sizing:border-box;
	min-width:200px;
	max-width:980px;
	margin:0 auto;
	padding:45px;
	}
.markdown-body a{
	color:#0366d6;
	background-color:transparent;
	text-decoration:none;
	-webkit-text-decoration-skip:objects}
.markdown-body a:active,.markdown-body a:hover{
	outline-width:0}
.markdown-body a:hover{
	text-decoration:underline}
.markdown-body a:not([href]){
	color:inherit;text-decoration:none}
.markdown-body strong{font-weight:600}
.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{
	margin-top:24px;
	margin-bottom:16px;
	font-weight:600;
	line-height:1.25}
.markdown-body h1{
	font-size:2em;
	margin:.67em 0;
	padding-bottom:.3em;
	border-bottom:1px solid #eaecef}
.markdown-body h2{
	padding-bottom:.3em;
	font-size:1.5em;
	border-bottom:1px solid #eaecef}
.markdown-body h3{font-size:1.25em}
.markdown-body h4{font-size:1em}
.markdown-body h5{font-size:.875em}
.markdown-body h6{font-size:.85em;color:#6a737d}
.markdown-body img{border-style:none}
.markdown-body svg:not(:root){
	overflow:hidden}
.markdown-body hr{
	box-sizing:content-box;
	height:.25em;
	margin:24px 0;
	padding:0;
	overflow:hidden;
	background-color:#e1e4e8;
	border:0}
.markdown-body hr::before{display:table;content:""}
.markdown-body hr::after{display:table;clear:both;content:""}
.markdown-body input{margin:0;overflow:visible;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit}
.markdown-body [type=checkbox]{box-sizing:border-box;padding:0}
.markdown-body *{box-sizing:border-box}.markdown-body blockquote{margin:0}
.markdown-body ol,.markdown-body ul{padding-left:2em}
.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}
.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}
.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}
.markdown-body li>p{margin-top:16px}
.markdown-body li+li{margin-top:.25em}
.markdown-body dd{margin-left:0}
.markdown-body dl{padding:0}
.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}
.markdown-body dl dd{padding:0 16px;margin-bottom:16px}
.markdown-body code{font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace}
.markdown-body pre{font:12px SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}
.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}
.markdown-body blockquote{padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}
.markdown-body blockquote>:first-child{margin-top:0}
.markdown-body blockquote>:last-child{margin-bottom:0}
.markdown-body table{display:block;width:100%;overflow:auto;border-spacing:0;border-collapse:collapse}
.markdown-body table th{font-weight:600}
.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #dfe2e5}
.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}
.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}
.markdown-body img{max-width:100%;box-sizing:content-box;background-color:#fff}
.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(27,31,35,.05);border-radius:3px}
.markdown-body code::after,.markdown-body code::before{letter-spacing:-.2em;content:"\00a0"}
.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}
.markdown-body .highlight{margin-bottom:16px}
.markdown-body .highlight pre{margin-bottom:0;word-break:normal}
.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}
.markdown-body pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}
.markdown-body pre code::after,.markdown-body pre code::before{content:normal}
.markdown-body .full-commit .btn-outline:not(:disabled):hover{color:#005cc5;border-color:#005cc5}
.markdown-body kbd{box-shadow:inset 0 -1px 0 #959da5;display:inline-block;padding:3px 5px;font:11px/10px SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#444d56;vertical-align:middle;background-color:#fcfcfc;border:1px solid #c6cbd1;border-bottom-color:#959da5;border-radius:3px;box-shadow:inset 0 -1px 0 #959da5}
.markdown-body :checked+.radio-label{position:relative;z-index:1;border-color:#0366d6}
.markdown-body .task-list-item{list-style-type:none}
.markdown-body .task-list-item+.task-list-item{margin-top:3px}
.markdown-body .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}
.markdown-body::before{display:table;content:""}
.markdown-body::after{display:table;clear:both;content:""}
.markdown-body>:first-child{margin-top:0!important}
.markdown-body>:last-child{margin-bottom:0!important}
.Alert,.Error,.Note,.Success,.Warning,.Tips,.HTips{padding:11px;margin-bottom:24px;border-style:solid;border-width:1px;border-radius:4px}
.Alert p,.Error p,.Note p,.Success p,.Warning p,.Tips p,.HTips p{margin-top:0}
.Alert p:last-child,.Error p:last-child,.Note p:last-child,.Success p:last-child,.Warning p:last-child,.Tips p:last-child,.HTips p:last-child{margin-bottom:0}
.Alert{color:#246;background-color:#e2eef9;border-color:#bac6d3}
.Warning{color:#4c4a42;background-color:#fff9ea;border-color:#dfd8c2}
.Error{color:#911;background-color:#fcdede;border-color:#d2b2b2}
.Success{color:#22662c;background-color:#e2f9e5;border-color:#bad3be}
.Note{color:#2f363d;background-color:#f6f8fa;border-color:#d5d8da}
.Alert h1,.Alert h2,.Alert h3,.Alert h4,.Alert h5,.Alert h6{color:#246;margin-bottom:0}
.Warning h1,.Warning h2,.Warning h3,.Warning h4,.Warning h5,.Warning h6{color:#4c4a42;margin-bottom:0}
.Error h1,.Error h2,.Error h3,.Error h4,.Error h5,.Error h6{color:#911;margin-bottom:0}
.Success h1,.Success h2,.Success h3,.Success h4,.Success h5,.Success h6{color:#22662c;margin-bottom:0}
.Note h1,.Note h2,.Note h3,.Note h4,.Note h5,.Note h6{color:#2f363d;margin-bottom:0}
.Tips h1,.Tips h2,.Tips h3,.Tips h4,.Tips h5,.Tips h6{color:#2f363d;margin-bottom:0}
.HTips h1,.HTips h2,.HTips h3,.HTips h4,.HTips h5,.HTips h6{color:#2f363d;margin-bottom:0}
.Tips h1:first-child,.Tips h2:first-child,.Tips h3:first-child,.Tips h4:first-child,.Tips h5:first-child,.Tips h6:first-child,.Alert h1:first-child,.Alert h2:first-child,.Alert h3:first-child,.Alert h4:first-child,.Alert h5:first-child,.Alert h6:first-child,.Error h1:first-child,.Error h2:first-child,.Error h3:first-child,.Error h4:first-child,.Error h5:first-child,.Error h6:first-child,.Note h1:first-child,.Note h2:first-child,.Note h3:first-child,.Note h4:first-child,.Note h5:first-child,.Note h6:first-child,.Success h1:first-child,.Success h2:first-child,.Success h3:first-child,.Success h4:first-child,.Success h5:first-child,.Success h6:first-child,.Warning h1:first-child,.Warning h2:first-child,.Warning h3:first-child,.Warning h4:first-child,.Warning h5:first-child,.Warning h6:first-child{margin-top:0}
h1.title,p.subtitle{text-align:center}
h1.title.followed-by-subtitle{margin-bottom:0}
p.subtitle{font-size:1.5em;font-weight:600;line-height:1.25;margin-top:0;margin-bottom:16px;padding-bottom:.3em}
div.line-block{white-space:pre-line}
  </style>
  <style type="text/css">code{white-space: pre;}</style>
  <style type="text/css">
	pre > code.sourceCode { white-space: pre; position: relative; }
 pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
 pre > code.sourceCode > span:empty { height: 1.2em; }
 .sourceCode { overflow: visible; }
 code.sourceCode > span { color: inherit; text-decoration: inherit; }
 div.sourceCode { margin: 1em 0; }
 pre.sourceCode { margin: 0; }
 @media screen {
 div.sourceCode { overflow: auto; }
 }
 @media print {
 pre > code.sourceCode { white-space: pre-wrap; }
 pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
 }
 pre.numberSource code
   { counter-reset: source-line 0; }
 pre.numberSource code > span
   { position: relative; left: -4em; counter-increment: source-line; }
 pre.numberSource code > span > a:first-child::before
   { content: counter(source-line);
     position: relative; left: -1em; text-align: right; vertical-align: baseline;
     border: none; display: inline-block;
     -webkit-touch-callout: none; -webkit-user-select: none;
     -khtml-user-select: none; -moz-user-select: none;
     -ms-user-select: none; user-select: none;
     padding: 0 4px; width: 4em;
     background-color: #ffffff;
     color: #a0a0a0;
   }
 pre.numberSource { margin-left: 3em; border-left: 1px solid #a0a0a0;  padding-left: 4px; }
 div.sourceCode
   { color: #1f1c1b; background-color: #ffffff; }
 @media screen {
 pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
 }
 code span { color: #1f1c1b; } /* Normal */
 code span.al { color: #bf0303; background-color: #f7e6e6; font-weight: bold; } /* Alert */
 code span.an { color: #ca60ca; } /* Annotation */
 code span.at { color: #0057ae; } /* Attribute */
 code span.bn { color: #b08000; } /* BaseN */
 code span.bu { color: #644a9b; font-weight: bold; } /* BuiltIn */
 code span.cf { color: #1f1c1b; font-weight: bold; } /* ControlFlow */
 code span.ch { color: #924c9d; } /* Char */
 code span.cn { color: #aa5500; } /* Constant */
 code span.co { color: #898887; } /* Comment */
 code span.cv { color: #0095ff; } /* CommentVar */
 code span.do { color: #607880; } /* Documentation */
 code span.dt { color: #0057ae; } /* DataType */
 code span.dv { color: #b08000; } /* DecVal */
 code span.er { color: #bf0303; text-decoration: underline; } /* Error */
 code span.ex { color: #0095ff; font-weight: bold; } /* Extension */
 code span.fl { color: #b08000; } /* Float */
 code span.fu { color: #644a9b; } /* Function */
 code span.im { color: #ff5500; } /* Import */
 code span.in { color: #b08000; } /* Information */
 code span.kw { color: #1f1c1b; font-weight: bold; } /* Keyword */
 code span.op { color: #1f1c1b; } /* Operator */
 code span.ot { color: #006e28; } /* Other */
 code span.pp { color: #006e28; } /* Preprocessor */
 code span.re { color: #0057ae; background-color: #e0e9f8; } /* RegionMarker */
 code span.sc { color: #3daee9; } /* SpecialChar */
 code span.ss { color: #ff5500; } /* SpecialString */
 code span.st { color: #bf0303; } /* String */
 code span.va { color: #0057ae; } /* Variable */
 code span.vs { color: #bf0303; } /* VerbatimString */
 code span.wa { color: #bf0303; } /* Warning */
  </style>
  <link rel="stylesheet" href="data:text/css,%3Aroot%20%7B%2D%2Dmain%2Ddarkblue%2Dcolor%3A%20rgb%283%2C35%2C75%29%3B%20%2D%2Dmain%2Dlightblue%2Dcolor%3A%20rgb%2860%2C180%2C230%29%3B%20%2D%2Dmain%2Dpink%2Dcolor%3A%20rgb%28230%2C0%2C126%29%3B%20%2D%2Dmain%2Dyellow%2Dcolor%3A%20rgb%28255%2C210%2C0%29%3B%20%2D%2Dsecondary%2Dgrey%2Dcolor%3A%20rgb%2870%2C70%2C80%29%3B%20%2D%2Dsecondary%2Dgrey%2Dcolor%2D25%3A%20rgb%28209%2C209%2C211%29%3B%20%2D%2Dsecondary%2Dgrey%2Dcolor%2D12%3A%20rgb%28233%2C233%2C234%29%3B%20%2D%2Dsecondary%2Dlightgreen%2Dcolor%3A%20rgb%2873%2C177%2C112%29%3B%20%2D%2Dsecondary%2Dpurple%2Dcolor%3A%20rgb%28140%2C0%2C120%29%3B%20%2D%2Dsecondary%2Ddarkgreen%2Dcolor%3A%20rgb%284%2C87%2C47%29%3B%20%2D%2Dsidenav%2Dfont%2Dsize%3A%2090%25%3B%7Dhtml%20%7Bfont%2Dfamily%3A%20%22Arial%22%2C%20sans%2Dserif%3B%7D%2A%20%7Bxbox%2Dsizing%3A%20border%2Dbox%3B%7D%2Est%5Fheader%20h1%2Etitle%2C%2Est%5Fheader%20p%2Esubtitle%20%7Btext%2Dalign%3A%20left%3B%7D%2Est%5Fheader%20h1%2Etitle%20%7Bborder%2Dcolor%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%3Bmargin%2Dbottom%3A5px%3B%7D%2Est%5Fheader%20p%2Esubtitle%20%7Bcolor%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%3Bfont%2Dsize%3A90%25%3B%7D%2Est%5Fheader%20h1%2Etitle%2Efollowed%2Dby%2Dsubtitle%20%7Bborder%2Dbottom%3A2px%20solid%3Bborder%2Dcolor%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%3Bmargin%2Dbottom%3A5px%3B%7D%2Est%5Fheader%20p%2Erevision%20%7Bdisplay%3A%20inline%2Dblock%3Bwidth%3A70%25%3B%7D%2Est%5Fheader%20div%2Eauthor%20%7Bfont%2Dstyle%3A%20italic%3B%7D%2Est%5Fheader%20div%2Esummary%20%7Bborder%2Dtop%3A%20solid%201px%20%23C0C0C0%3Bbackground%3A%20%23ECECEC%3Bpadding%3A%205px%3B%7D%2Est%5Ffooter%20%7Bfont%2Dsize%3A80%25%3B%7D%2Est%5Ffooter%20img%20%7Bfloat%3A%20right%3B%7D%2Est%5Ffooter%20%2Est%5Fnotice%20%7Bwidth%3A80%25%3B%7D%2Emarkdown%2Dbody%20%23header%2Dsection%2Dnumber%20%7Bfont%2Dsize%3A120%25%3B%7D%2Emarkdown%2Dbody%20h1%20%7Bborder%2Dbottom%3A1px%20solid%3Bborder%2Dcolor%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%3Bpadding%2Dbottom%3A%202px%3Bpadding%2Dtop%3A%2010px%3B%7D%2Emarkdown%2Dbody%20h2%20%7Bpadding%2Dbottom%3A%205px%3Bpadding%2Dtop%3A%2010px%3B%7D%2Emarkdown%2Dbody%20h2%20code%20%7Bbackground%2Dcolor%3A%20rgb%28255%2C%20255%2C%20255%29%3B%7D%23func%2EsourceCode%20%7Bborder%2Dleft%2Dstyle%3A%20solid%3Bborder%2Dcolor%3A%20rgb%280%2C%2032%2C%2082%29%3Bborder%2Dcolor%3A%20rgb%28255%2C%20244%2C%20191%29%3Bborder%2Dwidth%3A%208px%3Bpadding%3A0px%3B%7Dpre%20%3E%20code%20%7Bborder%3A%20solid%201px%20blue%3Bfont%2Dsize%3A60%25%3B%7DcodeXX%20%7Bborder%3A%20solid%201px%20blue%3Bfont%2Dsize%3A60%25%3B%7D%23func%2EsourceXXCode%3A%3Abefore%20%7Bcontent%3A%20%22Synopsis%22%3Bpadding%2Dleft%3A10px%3Bfont%2Dweight%3A%20bold%3B%7Dfigure%20%7Bpadding%3A0px%3Bmargin%2Dleft%3A5px%3Bmargin%2Dright%3A5px%3Bmargin%2Dleft%3A%20auto%3Bmargin%2Dright%3A%20auto%3B%7Dimg%5Bdata%2Dproperty%3D%22center%22%5D%20%7Bdisplay%3A%20block%3Bmargin%2Dtop%3A%2010px%3Bmargin%2Dleft%3A%20auto%3Bmargin%2Dright%3A%20auto%3Bpadding%3A%2010px%3B%7Dfigcaption%20%7Btext%2Dalign%3Aleft%3B%20%20border%2Dtop%3A%201px%20dotted%20%23888%3Bpadding%2Dbottom%3A%2020px%3Bmargin%2Dtop%3A%2010px%3B%7Dh1%20code%2C%20h2%20code%20%7Bfont%2Dsize%3A120%25%3B%7D%09%2Emarkdown%2Dbody%20table%20%7Bwidth%3A%20100%25%3Bmargin%2Dleft%3Aauto%3Bmargin%2Dright%3Aauto%3B%7D%2Emarkdown%2Dbody%20img%20%7Bborder%2Dradius%3A%204px%3Bpadding%3A%205px%3Bdisplay%3A%20block%3Bmargin%2Dleft%3A%20auto%3Bmargin%2Dright%3A%20auto%3Bwidth%3A%20auto%3B%7D%2Emarkdown%2Dbody%20%2Est%5Fheader%20img%2C%20%2Emarkdown%2Dbody%20%7Bborder%3A%20none%3Bborder%2Dradius%3A%20none%3Bpadding%3A%205px%3Bdisplay%3A%20block%3Bmargin%2Dleft%3A%20auto%3Bmargin%2Dright%3A%20auto%3Bwidth%3A%20auto%3Bbox%2Dshadow%3A%20none%3B%7D%2Emarkdown%2Dbody%20%7Bmargin%3A%2010px%3Bpadding%3A%2010px%3Bwidth%3A%20auto%3Bfont%2Dfamily%3A%20%22Arial%22%2C%20sans%2Dserif%3Bcolor%3A%20%2303234B%3Bcolor%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%7D%2Emarkdown%2Dbody%20h1%2C%20%2Emarkdown%2Dbody%20h2%2C%20%2Emarkdown%2Dbody%20h3%20%7B%20%20%20color%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%7D%2Emarkdown%2Dbody%3Ahover%20%7B%7D%2Emarkdown%2Dbody%20%2Econtents%20%7B%7D%2Emarkdown%2Dbody%20%2Etoc%2Dtitle%20%7B%7D%2Emarkdown%2Dbody%20%2Econtents%20li%20%7Blist%2Dstyle%2Dtype%3A%20none%3B%7D%2Emarkdown%2Dbody%20%2Econtents%20ul%20%7Bpadding%2Dleft%3A%2010px%3B%7D%2Emarkdown%2Dbody%20%2Econtents%20a%20%7Bcolor%3A%20%233CB4E6%3B%20%7D%2Emarkdown%2Dbody%20table%20%2Eheader%20%7Bbackground%2Dcolor%3A%20var%28%2D%2Dsecondary%2Dgrey%2Dcolor%2D12%29%3Bborder%2Dbottom%3A1px%20solid%3Bborder%2Dtop%3A1px%20solid%3Bfont%2Dsize%3A%2090%25%3B%7D%2Emarkdown%2Dbody%20table%20th%20%7Bfont%2Dweight%3A%20bolder%3B%20%7D%2Emarkdown%2Dbody%20table%20td%20%7Bfont%2Dsize%3A%2090%25%3B%7D%2Emarkdown%2Dbody%20code%7Bpadding%3A%200%3Bmargin%3A0%3Bfont%2Dsize%3A95%25%3Bbackground%2Dcolor%3Argba%2827%2C31%2C35%2C%2E05%29%3Bborder%2Dradius%3A1px%3B%7D%2ETips%20%7Bpadding%3A11px%3Bmargin%2Dbottom%3A24px%3Bborder%2Dstyle%3Asolid%3Bborder%2Dwidth%3A1px%3Bborder%2Dradius%3A1px%7D%2ETips%20%7Bcolor%3A%232f363d%3B%20background%2Dcolor%3A%20%23f6f8fa%3Bborder%2Dcolor%3A%23d5d8da%3Bborder%2Dtop%3A1px%20solid%3Bborder%2Dbottom%3A1px%20solid%3B%7D%2EHTips%20%7Bpadding%3A11px%3Bmargin%2Dbottom%3A24px%3Bborder%2Dstyle%3Asolid%3Bborder%2Dwidth%3A1px%3Bborder%2Dradius%3A1px%7D%2EHTips%20%7Bcolor%3A%232f363d%3B%20background%2Dcolor%3A%23fff9ea%3Bborder%2Dcolor%3A%23d5d8da%3Bborder%2Dtop%3A1px%20solid%3Bborder%2Dbottom%3A1px%20solid%3B%7D%2EHTips%20h1%2C%2EHTips%20h2%2C%2EHTips%20h3%2C%2EHTips%20h4%2C%2EHTips%20h5%2C%2EHTips%20h6%20%7Bcolor%3A%232f363d%3Bmargin%2Dbottom%3A0%7D%2Esidenav%20%7Bfont%2Dfamily%3A%20%22Arial%22%2C%20sans%2Dserif%3B%20%20color%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%3Bheight%3A%20100%25%3Bposition%3A%20fixed%3Bz%2Dindex%3A%201%3Btop%3A%200%3Bleft%3A%200%3Bmargin%2Dright%3A%2010px%3Bmargin%2Dleft%3A%2010px%3B%20overflow%2Dx%3A%20hidden%3B%7D%2Esidenav%20hr%2Enew1%20%7Bborder%2Dwidth%3A%20thin%3Bborder%2Dcolor%3A%20var%28%2D%2Dmain%2Dlightblue%2Dcolor%29%3Bmargin%2Dright%3A%2010px%3Bmargin%2Dtop%3A%20%2D10px%3B%7D%2Esidenav%20%23sidenav%5Fheader%20%7Bmargin%2Dtop%3A%2010px%3Bborder%3A%201px%3Bcolor%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%3Bborder%2Dcolor%3A%20var%28%2D%2Dmain%2Dlightblue%2Dcolor%29%3B%7D%2Esidenav%20%23sidenav%5Fheader%20img%20%7Bfloat%3A%20left%3B%7D%2Esidenav%20%23sidenav%5Fheader%20a%20%7Bmargin%2Dleft%3A%200px%3Bmargin%2Dright%3A%200px%3Bpadding%2Dleft%3A%200px%3B%7D%2Esidenav%20%23sidenav%5Fheader%20a%3Ahover%20%7Bbackground%2Dsize%3A%20auto%3Bcolor%3A%20%23FFD200%3B%20%7D%2Esidenav%20%23sidenav%5Fheader%20a%3Aactive%20%7B%20%20%7D%2Esidenav%20%3E%20ul%20%7Bbackground%2Dcolor%3A%20rgba%2857%2C%20169%2C%20220%2C%200%2E05%29%3B%20color%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%3Bborder%2Dradius%3A%2010px%3Bpadding%2Dbottom%3A%2010px%3Bpadding%2Dtop%3A%2010px%3Bpadding%2Dright%3A%2010px%3Bmargin%2Dright%3A%2010px%3B%7D%2Esidenav%20a%20%7Bpadding%3A%202px%202px%3Btext%2Ddecoration%3A%20none%3Bfont%2Dsize%3A%20var%28%2D%2Dsidenav%2Dfont%2Dsize%29%3Bdisplay%3Atable%3B%7D%2Esidenav%20%3E%20ul%20%3E%20li%2C%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20ul%20%3E%20li%20%7B%20padding%2Dright%3A%205px%3Bpadding%2Dleft%3A%205px%3B%7D%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20a%20%7B%20color%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%3Bfont%2Dweight%3A%20lighter%3B%7D%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20ul%20%3E%20li%20%3E%20a%20%7B%20color%3A%20var%28%2D%2Dmain%2Ddarkblue%2Dcolor%29%3Bfont%2Dsize%3A%2080%25%3Bpadding%2Dleft%3A%2010px%3Btext%2Dalign%2Dlast%3A%20left%3B%7D%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20ul%20%3E%20li%20%3E%20ul%20%3E%20li%20%3E%20a%20%7B%20display%3A%20None%3B%7D%2Esidenav%20li%20%7Blist%2Dstyle%2Dtype%3A%20none%3B%7D%2Esidenav%20ul%20%7Bpadding%2Dleft%3A%200px%3B%7D%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20a%3Ahover%2C%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20ul%20%3E%20li%20%3E%20a%3Ahover%20%7Bbackground%2Dcolor%3A%20var%28%2D%2Dsecondary%2Dgrey%2Dcolor%2D12%29%3Bbackground%2Dclip%3A%20border%2Dbox%3Bmargin%2Dleft%3A%20%2D10px%3Bpadding%2Dleft%3A%2010px%3B%7D%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20a%3Ahover%20%7Bpadding%2Dright%3A%2015px%3Bwidth%3A%20230px%3B%09%7D%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20ul%20%3E%20li%20%3E%20a%3Ahover%20%7Bpadding%2Dright%3A%2010px%3Bwidth%3A%20230px%3B%09%7D%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20a%3Aactive%20%7B%20color%3A%20%23FFD200%3B%20%7D%2Esidenav%20%3E%20ul%20%3E%20li%20%3E%20ul%20%3E%20li%20%3E%20a%3Aactive%20%7B%20color%3A%20%23FFD200%3B%20%7D%2Esidenav%20code%20%7B%7D%2Esidenav%20%7Bwidth%3A%20280px%3B%7D%23sidenav%20%7Bmargin%2Dleft%3A%20300px%3Bdisplay%3Ablock%3B%7D%2Emarkdown%2Dbody%20%2Eprint%2Dcontents%20%7Bvisibility%3Ahidden%3B%7D%2Emarkdown%2Dbody%20%2Eprint%2Dtoc%2Dtitle%20%7Bvisibility%3Ahidden%3B%7D%2Emarkdown%2Dbody%20%7Bmax%2Dwidth%3A%20980px%3Bmin%2Dwidth%3A%20200px%3Bpadding%3A%2040px%3Bborder%2Dstyle%3A%20solid%3Bborder%2Dstyle%3A%20outset%3Bborder%2Dcolor%3A%20rgba%28104%2C%20167%2C%20238%2C%200%2E089%29%3Bborder%2Dradius%3A%205px%3B%7D%40media%20screen%20and%20%28max%2Dheight%3A%20450px%29%20%7B%2Esidenav%20%7Bpadding%2Dtop%3A%2015px%3B%7D%2Esidenav%20a%20%7Bfont%2Dsize%3A%2018px%3B%7D%23sidenav%20%7Bmargin%2Dleft%3A%2010px%3B%20%7D%2Esidenav%20%7Bvisibility%3Ahidden%3B%7D%2Emarkdown%2Dbody%20%7Bmargin%3A%2010px%3Bpadding%3A%2040px%3Bwidth%3A%20auto%3Bborder%3A%200px%3B%7D%7D%40media%20screen%20and%20%28max%2Dwidth%3A%201024px%29%20%7B%2Esidenav%20%7Bvisibility%3Ahidden%3B%7D%2Emarkdown%2Dbody%20%7Bmargin%3A%2010px%3Bpadding%3A%2040px%3Bwidth%3A%20auto%3Bborder%3A%200px%3B%7D%23sidenav%20%7Bmargin%2Dleft%3A%2010px%3B%7D%7D%40media%20print%20%7B%2Esidenav%20%7Bvisibility%3Ahidden%3B%7D%23sidenav%20%7Bmargin%2Dleft%3A%2010px%3B%7D%2Emarkdown%2Dbody%20%7Bmargin%3A%2010px%3Bpadding%3A%2010px%3Bwidth%3Aauto%3Bborder%3A%200px%3B%7D%40page%20%7Bsize%3A%20A4%3B%20%20margin%3A2cm%3Bpadding%3A2cm%3Bmargin%2Dtop%3A%201cm%3Bpadding%2Dbottom%3A%201cm%3B%7D%2A%20%7Bxbox%2Dsizing%3A%20border%2Dbox%3Bfont%2Dsize%3A90%25%3B%7Da%20%7Bfont%2Dsize%3A%20100%25%3Bcolor%3A%20yellow%3B%7D%2Emarkdown%2Dbody%20article%20%7Bxbox%2Dsizing%3A%20border%2Dbox%3Bfont%2Dsize%3A100%25%3B%7D%2Emarkdown%2Dbody%20p%20%7Bwindows%3A%202%3Borphans%3A%202%3B%7D%2Epagebreakerafter%20%7Bpage%2Dbreak%2Dafter%3A%20always%3Bpadding%2Dtop%3A10mm%3B%7D%2Epagebreakbefore%20%7Bpage%2Dbreak%2Dbefore%3A%20always%3B%7Dh1%2C%20h2%2C%20h3%2C%20h4%20%7Bpage%2Dbreak%2Dafter%3A%20avoid%3B%7Ddiv%2C%20code%2C%20blockquote%2C%20li%2C%20span%2C%20table%2C%20figure%20%7Bpage%2Dbreak%2Dinside%3A%20avoid%3B%7D%7D">
  <!--[if lt IE 9]>
    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
  <![endif]-->





<link rel="shortcut icon" href="">

</head>



<body>

		<div class="sidenav">
		<div id="sidenav_header">
							<img src="" title="STM32CubeMX.AI logo" align="left" height="70" />
										<br />7.0.0-dev<br />
										<a href="#doc_title"> Toolboxes and layers </a>
					</div>
		<div id="sidenav_header_button">
			 
							<ul>
					<li><p><a id="index" href="index.html">[ Index ]</a></p></li>
				</ul>
						<hr class="new1">
		</div>	

		<ul>
  <li><a href="#overview">Overview</a></li>
  <li><a href="#keras">Keras</a></li>
  <li><a href="#tensorflow-lite">Tensorflow Lite</a></li>
  <li><a href="#onnx">ONNX</a></li>
  <li><a href="#b-integer-support">8b integer support</a></li>
  </ul>
	</div>
	<article id="sidenav" class="markdown-body">
		



<header>
<section class="st_header" id="doc_title">

<div class="himage">
	<img src="" title="STM32CubeMX.AI" align="right" height="70" />
	<img src="" title="STM32" align="right" height="90" />
</div>

<h1 class="title followed-by-subtitle">Toolboxes and layers</h1>

	<p class="subtitle">X-CUBE-AI Expansion Package</p>


	<div class="ai_platform">
		AI PLATFORM r7.0.0-dev
					(Embedded Inference Client API 1.1.0)
			</div>
			Command Line Interface r1.4.2
	




</section>
</header>
 




<section id="overview" class="level1">
<h1>Overview</h1>
<p><strong>X-CUBE-AI</strong> currently support the following deep learning toolboxes:</p>
<ul>
<li><a href="#keras">Keras</a></li>
<li><a href="#tensorflow-lite">Tensorflow Lite</a></li>
<li><a href="#onnx">ONNX</a></li>
</ul>
<p>For each toolbox we support only a subset of all the possible layers and layer parameters, depending on the expressive power of the network C API and on the parser for the specific toolbox. Moreover, only a subset of the layers supported in floating point is available in 8b integer (and Qmn) for quantized <em>TFlite</em>/<em>Keras</em> models. For a detailed list see:</p>
<ul>
<li><a href="#b-integer-support">8b integer support</a></li>
</ul>
<p>Here we describe in detail the configurations supported by the current version of the tool for each toolbox in terms of layers supported (using the toolbox naming conventions) and the attributes (parameters) supported for each layer. When the same functionality is supported by multiple layers, they are listed together.</p>
</section>
<section id="keras" class="level1">
<h1>Keras</h1>
<p>In <a href="https://keras.io/">*Keras*</a> we support the <em>Tensorflow</em> backend with <em>channels-last</em> dimension ordering. Keras <em>2.0</em> up to version <em>2.3.1</em> is supported, while networks defined in Keras <em>1.x</em> are not officially supported.</p>
<p>Model may be loaded from a single file with model and weights (<code>.h5</code>, <code>.hdf5</code>) or from the model configuration and weight in separate files. In the latter case, the weights are loaded from a HDF5 file (<code>.h5</code>, <code>.hdf5</code>) and model configuration is loaded from a text file, either JSON (<code>.json</code>) or YAML (<code>.yml</code>, <code>.yaml</code>).</p>
<p>The following layers and attributes are supported:</p>
<ul>
<li><strong>Dense</strong>: dense (fully connected) layer. The following attributes are supported:
<ul>
<li><em>units</em>: number of output features</li>
<li><em>use_bias</em>: don&#39;t use bias if set to &#39;False&#39;</li>
</ul></li>
<li><strong>Activation</strong>: nonlinear activation layer, decoded also when part of <em>Conv2D</em>, <em>DepthwiseConv2D</em>, <em>SeparableConv2D</em> and <em>Dense</em>. The following attributes are supported:
<ul>
<li><em>nonlinearity</em>: type of nonlinear activation; all the Keras functions are supported including <em>softmax</em>, <em>elu</em>, <em>selu</em>, <em>softplus</em>, <em>softsign</em>, <em>relu</em>, <em>tanh</em>, <em>sigmoid</em>, <em>hard_sigmoid</em>, <em>exponential</em> and <em>linear</em>, <em>relu6</em> is supported only as a custom function (see note below)</li>
</ul></li>
<li><strong>Flatten</strong>: flattens the non-batch input dimensions to a vector; mapped as a special <em>Reshape</em> layer.</li>
<li><strong>InputLayer</strong>: optional placeholder for the network&#39;s input, dropped during conversion.</li>
<li><strong>Reshape</strong>: changes the shape of the input tensor without changing the number of elements. The following attributes are supported:
<ul>
<li><em>shape</em>: target shape. Infer (-1) and keep same (0) values are also supported.</li>
</ul></li>
<li><strong>Permute</strong>: dimension permutation layer, only 3D tensors are supported. The following attributes are supported:
<ul>
<li><em>dims</em>: target dimension order given the input dimension order, only for non-batch dimensions.</li>
</ul></li>
<li><strong>RepeatVector</strong>: repeats a vector along a spatial dimension. The following attributes are supported:
<ul>
<li><em>n</em>: number of repetitions.</li>
</ul></li>
<li><strong>Conv1D</strong>, <strong>Conv2D</strong>: convolutional layers; 1D convolutions are supported by adding a singleton dimension on <em>x</em>. The following attributes are supported:
<ul>
<li><em>padding</em>: &#39;SAME&#39; and &#39;VALID&#39; strategies; arbitrary padding is supported by the use of the <em>ZeroPadding</em> layers (see below) and in this case, the input size of the network is computed from the input of the <em>ZeroPadding</em> layer.</li>
<li><em>kernel_size</em>: arbitrary filter kernel sizes, provided that they are smaller than the input size</li>
<li><em>stride</em>: arbitrary strides, provided that they are smaller than the input size</li>
<li><em>filters</em>: number of output channels</li>
<li><em>use_bias</em>: don&#39;t use bias if set to &#39;False&#39;</li>
<li><em>dilatation_rate</em>: specify the dilation rate to use for dilated convolution.</li>
</ul></li>
<li><strong>SeparableConv1D</strong>, <strong>SeparableConv2D</strong>: concatenation of a depthwise convolution without bias and a 1x1 convolution. The attributes of <em>DepthwiseConv2D</em> and <em>Conv2D</em> are supported.</li>
<li><strong>DepthwiseConv1D</strong>, <strong>DepthwiseConv2D</strong>: depthwise convolutional layers; support the same attributes as <em>Convolution2D</em> plus the additional attributes:
<ul>
<li><em>depth_multiplier</em>: number of channels per feature group; the number of output groups and channels is automatically inferred.</li>
</ul></li>
<li><strong>Conv2DTranspose</strong>: transposed convolutional layer; the attributes of <strong>Conv2D</strong> are supported, plus the additional attributes:
<ul>
<li><em>output_padding</em>: padding along the output tensor, all values are supported.</li>
</ul></li>
<li><strong>Cropping1D</strong>, <strong>Cropping2D</strong>: cropping layers, all the parameters are supported.</li>
<li><strong>Upsampling1D</strong>, <strong>Upsampling2D</strong>: image upsampling layers, all the parameters are supported.</li>
<li><strong>ZeroPadding1D</strong>, <strong>ZeroPadding2D</strong>: padding layers. The following attribute is supported:
<ul>
<li><em>padding</em>: list of padding values, symmetric and asymmetric padding supported.</li>
</ul></li>
<li><strong>MaxPooling1D</strong>, <strong>MaxPooling2D</strong>: max pooling layers, the 1D versions are supported by adding a singleton dimension on <em>x</em>. The following attributes are supported:
<ul>
<li><em>padding</em>: &#39;SAME&#39; and &#39;VALID&#39; strategies</li>
<li><em>pool_size</em>: arbitrary pool sizes, provided they are smaller than the input size</li>
<li><em>strides</em>: arbitrary strides, provided they are smaller than the input size.</li>
</ul></li>
<li><strong>AveragePooling1D</strong>, <strong>AveragePooling2D</strong>: average pooling layers, same attributes as the max pooling layers.</li>
<li><strong>GlobalMaxPooling1D</strong>, <strong>GlobalMaxPooling2D</strong>, <strong>GlobalAveragePooling1D</strong>, <strong>GlobalAveragePooling2D</strong>: global max and average pooling layers, supported by setting <em>pool_size</em> and <em>strides</em> to the input size of the layer.</li>
<li><strong>LSTM</strong>: Long-Short Term Memory layer. The following attributes are supported:
<ul>
<li><em>units</em> number of cell / hidden units</li>
<li><em>activation</em>: hidden-to-output activation; the following functions are supported: <em>linear</em>, <em>relu</em>, <em>tanh</em>, <em>sigmoid</em>, <em>hard_sigmoid</em></li>
<li><em>recurrent_activation</em>: hidden-to-hidden activation; the functions from <em>activation</em> are supported</li>
<li><em>return_sequences</em>: if &#39;True&#39;, return all the hidden states instead of the last one only</li>
<li><em>use_bias</em>: don&#39;t use bias if set to &#39;False&#39;.</li>
</ul></li>
<li><strong>GRU</strong>: Gated Recurrent Unit layer; supports all the <em>LSTM</em> attributes and additionally supports:
<ul>
<li><em>reset_after</em>: uses a slightly different formula to align to the <em>CuDNN</em> implementation. Available only in Keras &gt;= 2.1.0.</li>
</ul></li>
<li><strong>Add</strong>, <strong>Subtract</strong>, <strong>Multiply</strong>, <strong>Maximum</strong>, <strong>Minimum</strong>: layers applying an operation element by element; broadcasting of input dimensions is supported.</li>
<li><strong>Concatenate</strong>: concatenate two input layers, the following attributes are supported:
<ul>
<li><em>axis</em>: concatenation axis.</li>
</ul></li>
<li><strong>ReLU</strong>, <strong>ThresholdedReLU</strong>, <strong>LeakyReLU</strong>: advanced ReLU layers, all the parameters are supported.</li>
<li><dl>
<dt><strong>PReLU</strong>: parametric ReLU, the <em>shared_axes</em> attribute is supported only if</dt>
<dd><p>the axes are a set of contiguous leading axes (e.g. 1, 2).</p>
</dd>
</dl></li>
<li><strong>ELU</strong>, <strong>Softmax</strong>: parametric nonlinear layers, all the parameters are supported.</li>
<li><strong>BatchNormalization</strong>: batch normalization layer. The following attributes are supported:
<ul>
<li><em>axis</em>: input dimension on which the normalization is performed. Only normalization on the last axis (channels) is supported.</li>
</ul></li>
<li><strong>Bidirectional</strong>: wrapper for bidirectional RNNs, only graphs with a single layer are handled; the following attributes are supported:
<ul>
<li><em>merge_mode</em>: only the <em>concat</em>, <em>mul</em> and <em>sum</em> modes are supported.</li>
</ul></li>
<li><strong>Dropout</strong>, <strong>ActivityRegularization</strong>, <strong>SpatialDropout1D</strong>, <strong>SpatialDropout2D</strong>, <strong>GaussianNoise</strong>, <strong>GaussianDropout</strong>, <strong>AlphaDropout</strong>: training only layers, ignored in the conversion.</li>
</ul>
<p>Note: the <em>relu6</em> functions is required by the MobileNet architectures, but it is not defined among the standard Keras activations. For Keras up to <em>2.2.2</em> you may use the definition in <code>keras_applications.mobilenet</code>; later versions use the supported builtin <strong>ReLU</strong> layer.</p>
<p>To load or save models using <em>relu6</em> you need to pass the function as custom object, i.e.:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>model <span class="op">=</span> load_model(model_file, custom_objects<span class="op">=</span>{<span class="st">&#39;relu6&#39;</span>: relu6}</span></code></pre></div>
<p>where the function is imported from the <code>mobilenet</code> package or from Tensorflow (<code>tf.nn.relu6</code>).</p>
</section>
<section id="tensorflow-lite" class="level1">
<h1>Tensorflow Lite</h1>
<p><a href="https://www.tensorflow.org/lite/">*Tensorflow Lite*</a> is the format used to deploy neural network models on mobile platforms. Cube.Ai converts the bytestream (<code>.tflite</code> files) to C code; a number of operators from the <a href="https://www.tensorflow.org/lite/guide/ops_compatibility">*supported operator*</a> list are handled and quantized models are partially supported.</p>
<p>We support the following operators:</p>
<ul>
<li><strong>ADD</strong>, <strong>DIV</strong>, <strong>FLOOR_DIV</strong>, <strong>FLOOR_MOD</strong>, <strong>MINIMUM</strong>, <strong>MAXIMUM</strong>, <strong>MUL</strong>, <strong>POW</strong>, <strong>SUB</strong>: element-wise operators, the optional <em>fused activation</em> is supported.</li>
<li><strong>AVERAGE_POOL_2D</strong>, <strong>MAX_POOL_2D</strong>: pooling operators, all parameters are supported.</li>
<li><strong>CONCATENATION</strong>: concatenates tensors, <em>axis</em> and <em>fused activation</em> are supported.</li>
<li><strong>CONV_2D</strong>, <strong>TRANSPOSE_CONV</strong>, <strong>DEPTHWISE_CONV_2D</strong>: convolutional layers, all parameters are supported.</li>
<li><strong>ABS</strong>, <strong>CEIL</strong>, <strong>COS</strong>, <strong>ELU</strong>, <strong>EXP</strong>, <strong>FLOOR</strong>, <strong>LEAKY_RELU</strong>, <strong>LOG</strong>, <strong>LOGISTIC</strong>, <strong>NEG</strong>, <strong>RELU</strong>, <strong>RELU_N1_TO_1</strong>, <strong>RELU6</strong>, <strong>ROUND</strong>, <strong>RSQRT</strong>, <strong>SIN</strong>, <strong>SQRT</strong>, <strong>TANH</strong>: nonlinear functions supported.</li>
<li><strong>FULLY_CONNECTED</strong>: dense layer, <em>fused activation</em> is supported.</li>
<li><strong>LOCAL_RESPONSE_NORMALIZATION</strong>: local response normalization along the channel dimension; all parameters are supported.</li>
<li><strong>PAD</strong>, <strong>PADV2</strong>: padding operators, only zero padding on the spatial dimensions is supported.</li>
<li><strong>PRELU</strong>: parametric ReLU, axis sharing is supported only on the leading dimensions.</li>
<li><strong>MEAN</strong>: computes the mean along one or more axes; only reduction along spatial dimensions is supported and it is mapped as global average pooling. <em>keep_dims</em> (leave dimension 1 on the reduce axes) is supported.</li>
<li><strong>QUANTIZE</strong>, <strong>DEQUANTIZE</strong>: format conversion layers, integer to integer (8 bits only) and integer to float conversions are supported.</li>
<li><strong>REDUCE_MAX</strong>: computes the maximum along one or more axes; reduction along spatial dimensions is mapped as global max pooling. <em>keep_dims</em> is also supported.</li>
<li><strong>REDUCE_MIN</strong>, <strong>REDUCE_PROD</strong>, <strong>SUM</strong>: axis reduction operators using the minimum, product and sum respectively. <em>keep_dims</em> is also supported.</li>
<li><strong>RESHAPE</strong>, <strong>SQUEEZE</strong>: tensor reshape operators, all parameters are supported.</li>
<li><strong>RESIZE_NEAREST_NEIGHBOR</strong>, <strong>RESIZE_BILINEAR</strong>: interpolation operators, only upsampling along spatial dimensions is supported. The <em>align_corner</em> attribute is supported.</li>
<li><strong>SLICE</strong>: dimension slicing, all parameters are supported.</li>
<li><strong>LOG_SOFTMAX</strong>, <strong>SOFTMAX</strong>: softmax nonlinearities, the <em>beta</em> parameter is not supported.</li>
<li><strong>SPLIT</strong>: tensor splitting operator, only the case where <em>num_splits</em> is 1 is supported.</li>
<li><strong>STRIDED_SLICE</strong>: dimension slicing with strides and optional squeeze; only unit strides are supported and <em>shrink_axis_mask</em> is not handled.</li>
<li><strong>TRANSPOSE</strong>: transposes a tensors; permutations involving the batch dimension are not supported.</li>
</ul>
</section>
<section id="onnx" class="level1">
<h1>ONNX</h1>
<p>In <a href="https://onnx.ai/">*ONNX*</a> a subset of operators from Opset 7, 8, 9 and 10 of ONNX <em>1.6</em> is supported.</p>
<p>Model may be loaded from a single file with model and weights (<code>.onnx</code>).</p>
<p>The following layers and attributes are supported:</p>
<ul>
<li><p><strong>Abs</strong>, <strong>Acos</strong>, <strong>Acosh</strong>, <strong>Asin</strong>, <strong>Asinh</strong>, <strong>Atan</strong>, <strong>Atanh</strong>, <strong>Ceil</strong>, <strong>Clip</strong>, <strong>Cos</strong>, <strong>Cosh</strong>, <strong>Erf</strong>, <strong>Exp</strong>, <strong>Floor</strong>, <strong>Log</strong>, <strong>Neg</strong>, <strong>Reciprocal</strong>, <strong>Relu</strong>, <strong>Round</strong>, <strong>Rsqrt</strong>, <strong>Sigmoid</strong>, <strong>Sign</strong>, <strong>Sin</strong>, <strong>Sinh</strong>, <strong>Softplus</strong>, <strong>Softsign</strong>, <strong>Sqrt</strong>, <strong>Tan</strong>, <strong>Tanh</strong>: nonlinear operators supported.</p></li>
<li><p><strong>Add</strong>: element-wise binary addition, supporting multi-directional broadcasting</p></li>
<li><p><strong>AveragePool</strong>: average pooling layer; only 1D and 2D pooling are supported. The following attributes are supported:</p>
<ul>
<li><em>auto_pad</em>: &#39;NOTSET&#39; (default),&#39;SAME_UPPER&#39;, &#39;SAME-LOWER&#39; and &#39;VALID&#39; strategies</li>
<li><em>ceil_mode</em>: whether to use ceil or floor (default) to compute the output shape</li>
<li><em>count_include_pad</em>: whether to include pad pixels when calculating values at the edges; the default is 0 (false).</li>
<li><em>kernel_shape</em>: the size of the pooling kernel along each axis</li>
<li><em>pads</em>: padding at the beginning and at the end of each spatial axis</li>
<li><em>strides</em>: arbitrary strides, provided they are smaller than the input size</li>
</ul></li>
<li><p><strong>BatchNormalization</strong>: batch normalization layer. Only one output (Y) is supported. The following attribute is supported:</p>
<ul>
<li><em>epsilon</em>: The epsilon value to use to avoid division by zero.</li>
</ul></li>
<li><p><strong>Concat</strong>: concatenate a list of tensors into a single tensor. Concatenation along the batch dimension is not supported. The following attribute is supported:</p>
<ul>
<li><em>axis</em>: concatenation axis. The accepted range is [1, r-1] where r is rank(inputs)</li>
</ul></li>
<li><p><strong>Constant</strong>: a constant tensor. The following attribute is supported:</p>
<p>-<em>value</em>: the constant value for the elements of the output tensor.</p></li>
<li><p><strong>Conv</strong>: convolutional layers; 1D and 2D convolutions are supported. The following attributes are supported:</p>
<ul>
<li><em>auto_pad</em>: &#39;NOTSET&#39; (default),&#39;SAME_UPPER&#39;, &#39;SAME-LOWER&#39; and &#39;VALID&#39; strategies</li>
<li><em>dilations</em>: dilation value along each spatial axis of the filter</li>
<li><em>group</em>: number of feature groups in the output channels</li>
<li><em>kernel_shape</em>: arbitrary filter kernel sizes, provided that they are smaller than the input size. If not present, it is inferred from the weights.</li>
<li><em>pads</em>: padding at the beginning and the end of each spatial axis</li>
<li><em>strides</em>: arbitrary strides along each axis, provided that they are smaller than the input size</li>
</ul></li>
<li><p><strong>ConvTranspose</strong>: transposed convolutional layers; 1D and 2D convolutions are supported. The following attributes are supported:</p>
<ul>
<li><em>auto_pad</em>: &#39;NOTSET&#39; (default),&#39;SAME_UPPER&#39;, &#39;SAME-LOWER&#39; and &#39;VALID&#39; strategies</li>
<li><em>dilations</em>: dilation value along each spatial axis of the filter</li>
<li><em>group</em>: number of feature groups in the output channels</li>
<li><em>kernel_shape</em>: arbitrary filter kernel sizes, provided that they are smaller than the input size. If not present, it is inferred from the weights.</li>
<li><em>output_padding</em>: additional padding on the bottom / left of the output</li>
<li><em>output_shape</em>: the shape of the output can be explicitly set; if <em>output_padding</em> is set, the <em>pads</em> amount will be inferred.</li>
<li><em>pads</em>: padding at the beginning and the end of each spatial axis</li>
<li><em>strides</em>: arbitrary strides along each axis, provided that they are smaller than the input size</li>
</ul></li>
<li><p><strong>Div</strong>: float division operator</p></li>
<li><p><strong>Elu</strong>: exponential linear unit operator. The following attribute is supported:</p>
<ul>
<li><em>alpha</em>: coefficient of Elu</li>
</ul></li>
<li><p><strong>Flatten</strong>: flattens the non-batch input dimensions to a vector; mapped as a special <em>Reshape</em> layer. The following attribute is supported:</p>
<ul>
<li><em>axis</em>: up to which input dimensions (exclusive) the input should be flattened; axis=0 is not supported.</li>
</ul></li>
<li><p><strong>Gemm</strong>: general Matrix multiplication: Y = alpha * A&#39; * B&#39; + beta * C, The following attributes are supported:</p>
<ul>
<li><em>alpha</em>: scalar multiplier for the product of the input tensors: A * B.</li>
<li><em>beta</em>: scalar multiplier for input tensor C.</li>
<li><em>transA</em>: whether A should be transposed</li>
<li><em>transB</em>: whether B should be transposed</li>
</ul></li>
<li><p><strong>Hardmax</strong>: hardmax non-linearity. It is supported only for 1D tensors and only on the channel dimension.</p></li>
<li><p><strong>HardSigmoid</strong>: hardsigmoid non-linearity. Supported only for 1D tensors, on the channel dimension. Supported only with the default parameters.</p></li>
<li><p><strong>GlobalAveragePool</strong>, <strong>GlobalMaxPool</strong>: global max and average pooling layers, supported by setting <em>pool_size</em> and <em>strides</em> to the input size of the layer.</p></li>
<li><p><strong>InstanceNormalization</strong>: instance normalization layer. The following attribute is supported:</p>
<ul>
<li><em>epsilon</em>: The epsilon value to use to avoid division by zero.</li>
</ul></li>
<li><p><strong>LeakyReLU</strong>: advanced ReLU layers. The following attribute is supported:</p></li>
</ul>
<blockquote>
<ul>
<li><em>alpha</em>: leakage coefficient</li>
</ul>
</blockquote>
<ul>
<li><p><strong>LogSoftmax</strong>: log-softmax non-linearity. It is supported only for 1D tensors and only on the channel dimension.</p></li>
<li><p><strong>LpNormalization</strong>: Lp-normalization operator. The following attributes are supported:</p>
<ul>
<li><em>axis</em>: axis on which to apply normalization</li>
<li><em>p</em>: order of the normalization (1 and 2 supported)</li>
</ul></li>
<li><p><strong>LRN</strong>: local response normalization layer within channels. The following attributes are supported:</p>
<ul>
<li><em>alpha</em>, <em>beta</em>, <em>bias</em>: parameters of the normalization equation</li>
<li><em>size</em>: the number of channels to sum over</li>
</ul></li>
<li><p><strong>MatMul</strong>: Matrix product.</p></li>
<li><p><strong>MaxPool</strong>: max pooling layer. Only 1D and 2D pooling are supported. The following attributes are supported:</p>
<ul>
<li><em>auto_pad</em>: &#39;NOTSET&#39; (default),&#39;SAME_UPPER&#39;, &#39;SAME-LOWER&#39; and &#39;VALID&#39; strategies</li>
<li><em>ceil_mode</em>: whether to use ceil or floor (default) to compute the output shape</li>
<li><em>kernel_shape</em>: the size of the kernel along each axis</li>
<li><em>pads</em>: padding at the beginning and the end of each spatial axis</li>
<li><em>strides</em>: arbitrary strides, provided they are smaller than the input size</li>
</ul></li>
<li><p><strong>Max</strong>, <strong>Min</strong>, <strong>Sub</strong>, <strong>Sum</strong>: max, min, sub and sum element-wise operators; the single input case is not supported.</p></li>
<li><p><strong>Mul</strong>, <strong>Pow</strong>: mul, pow element-wise operators.</p></li>
<li><p><strong>Pad</strong>: pads the input tensor with the number of start and end pad values for axis. The following attributes are supported:</p>
<ul>
<li><em>mode</em>: constant (default), reflect, edge</li>
<li><em>pads</em>: padding at the beginning and the end of each spatial axis. Only positive values are supported</li>
<li><em>value</em>: scalar float value indicating the padding value to use (default 0.0f)</li>
</ul></li>
<li><p><strong>PRelu</strong>: PRelu non-linearity. Shared axes in PReLU are supported only for the leading dimensions.</p></li>
<li><p><strong>ReduceMax</strong>, <strong>ReduceMin</strong>, <strong>ReduceMean</strong>, <strong>ReduceProd</strong>, <strong>ReduceSum</strong>: axis reduction operators using the maximum, minimum, mean, product and sum operations respectively. The following attributes are supported:</p>
<ul>
<li><em>axes</em>: axis indices along which the tensor will be reduced. Reduction is not supported on the batch dimension.</li>
<li><em>keep_dims</em>: whether to keep the reduced dimension or not; the default is 1 (true).</li>
</ul></li>
<li><p><strong>Reshape</strong>: reshape the input tensor.</p></li>
<li><p><strong>Resize</strong>: resize the input tensor. The following attributes are supported:</p>
<dl>
<dt>- <em>coordinate_transformation_mode</em>: describes how to transform the coordinate</dt>
<dd><p>in the resized tensor to the coordinate in the original tensor</p>
</dd>
</dl>
<ul>
<li><em>cubic_coeff_a</em>: The coefficient &#39;a&#39; used in cubic interpolation</li>
<li><em>exclude_outside</em></li>
<li><em>extrapolation_value</em></li>
<li><em>mode</em>: Two interpolation modes are supported: nearest (default) and linear</li>
</ul>
<dl>
<dt>- <em>nearest_mode</em>: Four modes: round_prefer_floor (default, as known as round half down),</dt>
<dd><p>round_prefer_ceil (as known as round half up), floor, ceil.</p>
</dd>
</dl></li>
<li><p><strong>Selu</strong>: scaled ELU operator. The following attributes are supported:</p>
<ul>
<li><em>alpha</em>: leakage coefficient</li>
<li><em>gamma</em>: scale coefficient</li>
</ul></li>
<li><p><strong>Slice</strong>: returns a slice of the input tensor along multiple axes. The following attributes are supported:</p>
<ul>
<li><em>ends</em>: end indices</li>
<li><em>starts</em>: start indices</li>
<li><em>axes</em>: axes on which <span class="title-ref">starts</span> and <span class="title-ref">ends</span> apply; only positive values are supported</li>
</ul></li>
<li><p><strong>Squeeze</strong>: removes singleton dimensions from the input tensor. The following attribute is supported:</p>
<dl>
<dt>- <em>axes</em>: indices of the dimensions to be removed;</dt>
<dd><p>if empty, all the singleton dimensions are removed.</p>
</dd>
</dl></li>
<li><p><strong>Softmax</strong>: softmax non-linearity. It is supported only for 1D tensors and only on the channel dimension.</p></li>
<li><p><strong>Tile</strong>: constructs a tensor by tiling the input tensor; tiling on the batch dimension is not supported.</p></li>
<li><p><strong>ThresholdedRelu</strong>: advanced Relu layer. The following attribute is supported:</p>
<ul>
<li><em>alpha</em>: threshold value</li>
</ul></li>
<li><p><strong>Transpose</strong>: changes the order of the axes in the input tensor; transposing the batch dimension is not supported. The following attribute is supported:</p>
<ul>
<li><em>perm</em>: list of integer mapping the output axes to the input axes</li>
</ul></li>
<li><p><strong>Unsqueeze</strong>: Insert single-dimensional entries in the input tensor shape. The following attribute is supported:</p>
<ul>
<li><em>axes</em>: list of integers indicating the dimensions to be inserted</li>
</ul></li>
<li><p><strong>Upsample</strong>: Upsample the input tensor. Only the Upsample-7 version is supported. The following attributes are supported:</p>
<ul>
<li><em>mode</em>: nearest (default) and bilinear are supported</li>
<li><em>scales</em>: list of scales along each dimension; it takes values greater than or equal to 1.</li>
</ul></li>
</ul>
</section>
<section id="b-integer-support" class="level1">
<h1>8b integer support</h1>
<p>The following operators are supported (integer and/or Qmn format):</p>
<ul>
<li><strong>Conv2D</strong>, <strong>Conv1D</strong>, <strong>DepthwiseConv2D</strong>, <strong>DepthwiseConv1D</strong>, <strong>SeparableConv2D</strong>, <strong>SeparableConv1D</strong>: the parameters of the floating point counterpart are supported with the following exceptions:
<ul>
<li><em>dilation</em>: values different from 1 are not supported</li>
</ul></li>
<li><strong>Dense</strong>: the parameters of the floating point counterpart are supported with the exception of dense layers applied to non-vector inputs, to emulate a 1x1 convolution (supported in Keras, not supported in fixed point).</li>
<li><strong>MaxPooling1D</strong>, <strong>MaxPooling2D</strong>, <strong>AveragePooling1D</strong>, <strong>AveragePooling2D</strong>, <strong>GlobalMaxPooling1D</strong>, <strong>GlobalMaxPooling2D</strong>, <strong>GlobalAveragePooling1D</strong>, <strong>GlobalAveragePooling2D</strong>; same support as the floating point version.</li>
<li><strong>Input</strong>, <strong>Permute</strong>, <strong>Flatten</strong>, <strong>Reshape</strong>: same support as the floating point version.</li>
<li><strong>Activation</strong>: only the following values for the <em>nonlinearity</em> attribute are supported: <em>linear</em>, <em>relu</em>, <em>softmax</em>, <em>sigmoid</em>, <em>tanh</em>
<ul>
<li>Advanced: <em>LeakyReLU</em>, <em>PReLU</em>, <em>ELU</em>, <em>ThresholdedReLU</em></li>
</ul></li>
</ul>
</section>



<section class="st_footer">

<h1> <br> </h1>

<p style="font-family:verdana; text-align:left;">
 Embedded Documentation 

	- <b> Toolboxes and layers </b>
			<br> X-CUBE-AI Expansion Package
	 
	
</p>

<img src="" title="ST logo" align="right" height="100" />

<div class="st_notice">
Information in this document is provided solely in connection with ST products.
The contents of this document are subject to change without prior notice.
<br>
© Copyright STMicroelectronics 2020. All rights reserved. <a href="http://www.st.com">www.st.com</a>
</div>

<hr size="1" />
</section>


</article>
</body>

</html>
